class Solution {
public:
    bool isPossibleToSplit(vector<int>& nums) {
        unordered_map<int, int> mp;
        for (auto x : nums) {
            mp[x]++;
            if (mp[x] >= 3) return false;
        }
        return true;
    }
};
